window.addEventListener('DOMContentLoaded', function () {
    const cursor = document.querySelector('.cursor');
    let Alla = document.getElementsByTagName('a');
    document.addEventListener('mousemove', (e) => {
        cursor.style.left = e.pageX + "px";
        cursor.style.top = e.pageY + "px"
    })

    document.addEventListener('mousewheel', (e) => {
        cursor.style.left = e.pageX + "px";
        cursor.style.top = e.pageY + "px"
    })

    for (let i = 0; i <= Alla.length - 1; i++) {
        Alla[i].addEventListener('mouseenter', function () {
            cursor.style.width = 60 + "px"
            cursor.style.height = 60 + "px"
        })
        Alla[i].addEventListener('mouseleave', function () {
            cursor.style.width = 20 + "px"
            cursor.style.height = 20 + "px"
        })
    }
})

